<template>
    <el-dialog :title="tip" :visible.sync="dialogFormVisible">
        <el-form :model="form">
            <el-form-item label="学生学号" :label-width="formLabelWidth">
                <el-input v-model="form.stuId" ></el-input>
            </el-form-item>
            <el-form-item label="学生姓名" :label-width="formLabelWidth">
                <el-input v-model="form.stuName" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="作业成绩" style="padding-left: 50px">
                        <span class="stu-scores">
                            1:&nbsp&nbsp&nbsp<el-input type="number" v-model="form.score1" size="mini"></el-input>&nbsp&nbsp
                            2:&nbsp&nbsp&nbsp<el-input type="number" v-model="form.score2" size="mini"></el-input>&nbsp&nbsp
                            3:&nbsp&nbsp&nbsp<el-input type="number" v-model="form.score3" size="mini"></el-input>&nbsp&nbsp
                            4:&nbsp&nbsp&nbsp<el-input type="number" v-model="form.score4" size="mini"></el-input>
                        </span>
            </el-form-item>
            <el-form-item label="测试成绩" style="padding-left: 50px">
                        <span class="stu-exams">
                            1:&nbsp&nbsp<el-input type="number" v-model="form.exam1" ></el-input>&nbsp&nbsp
                            2:&nbsp&nbsp<el-input type="number" v-model="form.exam2" ></el-input>
                        </span>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible = false">取 消</el-button>
            <el-button type="primary" @click="commitForm(1)">确 定</el-button>
        </div>
    </el-dialog>
</template>

<script>
    export default {
        data(){
            return {
                form:{},
            }

        },
        methods:{
            postFlagToParent() {
                this.$emit("getValueFromPushJob", false);
            }
        },
        watch: {
            flag: function () {
                this.dialogFormVisible = this.flag;
            },
            dialogFormVisible: function () {
                if (!this.dialogFormVisible) {
                    this.postFlagToParent()
                }
            }
        },
        props: ['flag', 'tip','form'],
    }
</script>

<style scoped>

</style>
